<?php 
/*print_r($this->roomcatsbyhotel_arr);
echo "<br>-----------------------------<br>";
print_r($this->roomcats_arr);EXIT;*/
?>
<form name="roomcat" action="/admin/hotel/doassignroomcats/hotel_id/<?php echo $this->hotel_id; ?>" method="post">
<table>
<?php foreach($this->roomcats_arr as $roomcats_entry) :
  $isroomcat=0;
?>
	<?php foreach($this->roomcatsbyhotel_arr as $roomcatsbyhotel_entry) :?>
		<?php if ($roomcatsbyhotel_entry['roomcat_id']==$roomcats_entry['roomcat_id']) {	
			$isroomcat=1;
		} ?>
	<?php endforeach; ?>
	<tr>
		    <td valign="top" align="center"><input <?php echo ($isroomcat==1? 'checked' : ''); ?>    type="checkbox" name="roomcats[]" value="<?php echo $roomcats_entry['roomcat_id']?>"></input></td>
		    <td><?php echo $roomcats_entry['roomcat_dsc']?></td>
		
	</tr>
<?php endforeach; ?>
<tr><td><input type="submit" value="save" name="submit"><input name="hotel_id" type="hidden" value="<?php echo  $this->hotel_id;?>"></td></tr>
</table>
</form>